<?php include('./application/views/header.php'); ?>

<table>
	<?php 
	$o = 1;
	foreach($prods as $prod) { ?>
		<tr>
			<td>
				<?php echo form_open('pricecontrol/process'); ?>
					<?php echo $prod['name']; ?>
					<?php echo form_input('price', $prod['price']); ?>
					<?php echo form_hidden('id', $prod['id']); ?>
					<select name="promotion">
						<option name="">No Promotion</option>
						
						<?php
						
						
						foreach($promo as $key => $p) {?>
							<option value="<?php echo $key; ?>" <?php if($key == $selected[$o]) { echo "selected"; } ?>><?php echo $p; ?></option>
						<?php
						
						} ?>
						
					</select>
					<?php echo form_submit('mysubmit', 'Update'); ?>
				<?php echo form_close(); ?>
			</td>
		</tr>
	<?php
$o++;
	} ?>
</table>
<?php include('./application/views/footer.php'); ?>
	